<div class="page_head">
<span>
  <table><tr><td>
  <div id=send_mail style="display:none">
    <%="Sending email".t%><%=image_tag"indicator.gif"%>
  </div>
  <div id=sent_mail style="display:none">
    <%="Welcome email have sent to %s"/ @user.name%>
   </div> 
   </td><td>
  <%=link_to_remote("Send %s a welcome email" / @user.name,{
      :url=>{:action=>'send_welcome_email',:id=>@user.id},
      :loading=>"Element.show('send_mail')",
      :complete=>"Element.hide('send_mail');Element.show('sent_mail')"},
      {:class=>'admin'})%>
  </td></tr></table>
</span>
<h2><%="Editing user".t%></h2>
</div>

<%form_for :user,:url=>person_path(params[:id]),:html=>{:method=>:put} do%>
<%="This person's name will appear with their messages, comments, and files and whenever they are responsible for a to-do or milestone.".t%>
<div class=logo>
<table>
<tr>
<td width=150><label for="user_name"><%='Last Name'.t%>:</label></td>
<td><%= text_field 'user', 'last_name', :size => 20  %></td></tr>

<tr><td><label for="user_name"><%='First Name'.t%>:</label></td>
<td><%= text_field 'user', 'first_name', :size => 20  %></td></tr>


<tr><td><label for="user_name"><%='User Name'.t%>:</label></td>
<td><%= text_field 'user', 'username', :style =>'width:200px'%>*(<%='MUST'.t%>)</td></tr>

<tr><td><label for="user_password"><%='Password'.t%>:</label></td>
<td><%= password_field 'user', 'password',:style=>'width:200px'%>*(<%='MUST'.t%>)
</td></tr>
<tr><td><%=image_tag"icon/email.gif"%><label for="user_name"><%='Email'.t%>:</label></td>
<td>
   <%=text_field 'user', 'email', :size => 40  %>
   <%=hidden_field_tag 'project_id', params[:project_id]%>
</td></tr>
<tr><td><label for="language"><%='Roles'.t%>:</label></td>
<td><%= select 'user','role',@cur_user.company.roles.collect{|r| [r.identifier,r.id]},:selected=>(@user.roles.size > 0 ? @user.roles.first.id : ""),:include_blank=>true%>
</td></tr>
<tr><td><label for="language"><%='Language'.t%>:</label></td>
<td><%= select 'user','lang',LANGTYPES%>
</td></tr>
</table>
</div>
<h3><%="Other Contact information(option)".t%></h3>
<div class=logo>
<table>
<tr><td width=150><%=image_tag"icon/msn.gif"%><label for="msn">MSN:</label></td>
<td><%= text_field 'user', 'msn', :size => 30  %></td></tr>
<tr><td width=150><%=image_tag"icon/gtalk.gif"%><label for="gtalk">GTalk:</label></td>
<td><%= text_field 'user', 'gtalk', :size => 30  %></td></tr>
<tr><td width=150><%=image_tag"icon/qq.gif"%><label for="qq">QQ:</label></td>
<td><%= text_field 'user', 'qq', :size => 30  %></td></tr>
</table>
</div>

<h3><%="Tel information(option)".t%></h3>
<div class=logo>
<table>
<tr><td width=150><label><%="Mobile".t%>:</label></td>
<td><%= text_field 'user', 'tel_mobile', :size => 25  %></td></tr>
<tr><td><label><%="Office phone".t%>:</label></td>
<td><%= text_field 'user', 'tel_work', :size => 25  %> - <%= text_field 'user', 'tel_work_ext', :size => 5  %></td></tr>
<tr><td><label><%="Home phone".t%>:</label></td>
<td><%= text_field 'user', 'tel_home', :size => 25  %></td></tr>
</table>
</div>

<hr class=black>
  <div class="float_center">
    <%=indicator"save"%>
  <%= submit_tag 'Save'.t ,:onclick=>"Element.show('indicator_save')"%> 
  or 
  <%= link_to 'Cancel'.t,"javascript:history.back(-1)",:class=>'admin'%>
  </div>
<%end%>

